import os, sys

nowFileId = 1
def WriteToFile(s):
	global nowFileId
	with open(str(nowFileId)+'.js','w') as f:
		f.write(s)
	nowFileId += 1

with open('追风筝的人 The Kite Runner.txt','r') as f:
	book = f.readlines()

s = ''
for line in book:
	s += line
	if len(s) > 10000:
		WriteToFile(s)
		s = ''
WriteToFile(s)
	
